Collection

@Serializable
open class Collection(val name: String? = null, val type: Collection.CollectionType? = null, val system: Boolean? = null, val fields: List<SchemaField>? = null, val listRule: String? = null, val viewRule: String? = null, val createRule: String? = null, val updateRule: String? = null, val deleteRule: String? = null, val indexes: List<String>? = null, collectionId: String? = null) : TimestampedModel

The object returned from the Pocketbase Collections API. Depending on the collection type, if you would like access to addition methods see CollectionType's comments.

Parameters

name

the name of the collection.

type

the type of the collection.

system

weather the collection was created internally by Pocketbase.

fields

the collection's SchemaFields which are used to determine what values are acceptable.

listRule

the pocketbase API rule which determines who can view each Record in the collection.

viewRule

the pocketbase API rule which determines who can view an individual Record in the collection.

createRule

the pocketbase API rules that determine who can create a Record in the collection.

updateRule

the pocketbase API rules that determine who can update a Record in the collection.

deleteRule

the pocketbase API rules that determine who can delete a Record in the collection.

indexes

the collection indexes which are used to determine which fields are unique.

Inheritors

Constructors

Link copied to clipboard
constructor(name: String? = null, type: Collection.CollectionType? = null, system: Boolean? = null, fields: List<SchemaField>? = null, listRule: String? = null, viewRule: String? = null, createRule: String? = null, updateRule: String? = null, deleteRule: String? = null, indexes: List<String>? = null, collectionId: String? = null)

Types

Link copied to clipboard

All the supported collection types.

Properties

Link copied to clipboard
val created: <Error class: unknown class>? = null
Link copied to clipboard
val createRule: String? = null
Link copied to clipboard
val deleteRule: String? = null
Link copied to clipboard
val fields: List<SchemaField>? = null
Link copied to clipboard
open val id: String? = null
Link copied to clipboard
val indexes: List<String>? = null
Link copied to clipboard
val listRule: String? = null
Link copied to clipboard
val name: String? = null
Link copied to clipboard
val system: Boolean? = null
Link copied to clipboard
Link copied to clipboard
val updated: <Error class: unknown class>? = null
Link copied to clipboard
val updateRule: String? = null
Link copied to clipboard
val viewRule: String? = null

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String